package linkwechat.mapper.system;

import linkwechat.pojo.LinkMenu;
import linkwechat.pojo.LinkRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import sun.awt.image.ImageWatched;

import java.util.List;
import java.util.Map;

@Mapper
public interface RoleMapper {

    List<LinkRole> GetRole(LinkRole role);

    List<LinkMenu> getMenu();

    List<LinkMenu> getMenuChil();

    Integer AddRole(LinkRole linkRole);

    Integer Add_Role_Menu(@Param("rid") Long rid , @Param("mid") Long mid);

    List<Map<String,Object>> selectMenuRole(Long id);

    Integer UpdRole(LinkRole role);

    //修改权限
    Integer DelRoleMenu(Long id);
    
    @Update("update sys_role set del_flag = 2  where role_id = #{id}  ;")
    Integer DelRoles(Long id);

}
